package com.zhihao.types.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResponseCode {

    SUCCESS("0000", "调用成功"),
    UN_ERROR("0001", "调用失败"),
    ILLEGAL_PARAMETER("0002", "非法参数"),
    INDEX_DUP("0003", "唯一索引冲突,outBusinessId重复"),
    DEGRADE_SWITCH("0004", "活动已降级"),
    RATE_LIMITER("0005", "访问限流拦截"),
    HYSTRIX("0006", "访问熔断拦截"),

    ACTIVITY_STATE_ERROR("ERR_BIZ_001", "活动未开启（非OPEN状态）"),
    ACTIVITY_DATE_ERROR("ERR_BIZ_002", "非活动日期范围"),
    ACTIVITY_SKU_STOCK_ERROR("ERR_BIZ_003", "sku活动库存不足"),
    ACTIVITY_SKU_STOCK_COUNT_KEY_NO_EXISTS_ERROR("ERR_BIZ_004", "sku活动库存redis缓存不存在"),

    ACCOUNT_QUOTA_ERROR("ERR_BIZ_005","账户总额度不足"),
    ACCOUNT_MONTH_QUOTA_ERROR("ERR_BIZ_006","账户月额度不足"),
    ACCOUNT_DAY_QUOTA_ERROR("ERR_BIZ_007","账户日额度不足"),

    STRATEGY_RULE_BlACKLIST_IS_NULL("ERR_BIZ_008", "业务异常，策略规则中 rule_blacklist 黑名单规则已适用但未配置"),
    STRATEGY_RULE_WEIGHT_IS_NULL("ERR_BIZ_009", "业务异常，策略规则中 rule_weight 权重规则已适用但未配置"),
    UN_ASSEMBLED_STRATEGY_ARMORY("ERR_BIZ_0010","抽奖策略配置未装配，请通过IStrategyArmory进行装配"),

    ACTIVITY_ORDER_ERROR("ERR_BIZ_0011", "用户抽奖单已使用过，不可重复抽奖"),

    AWARD_CONFIG_ERROR("ERR_CONFIG_0012", "award_config 配置不是一个范围值，如 1,100"),

    USER_CREDIT_ACCOUNT_NO_AVAILABLE_AMOUNT("ERR_CREDIT_0013", "用户积分账户额度不足"),

    ;

    private String code;
    private String info;


}
